package com.buyingtickets.service;

import com.buyingtickets.entity.QueryParameter;
import com.buyingtickets.entity.Ticket;
import com.buyingtickets.entity.TrainNumber;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

/**
 * @author bwj
 * @date 2021/6/24 9:09
 */
public interface TrainNumberService {

    public List<TrainNumber> queryBySiteDao(String startName, String destinationName, String date);//查询车次（入参：乘车日期、起点站名称、终点站名称）

    public List<TrainNumber> queryByHuanCheng(String startName, String destinationName, String date);//换乘的biz（入参：乘车日期、起点站名称、终点站名称）

    public Ticket queryIdChuPiao(TrainNumber trainNumber);//一人出票

//    public List<Ticket> queryIdDoubleChuPiao(TrainNumber trainNumber);//两人出票

    //添加车次
    boolean addTrainNum(@Param("trainid") int trainid, @Param("date") String date, @Param("time") String time);

    //是否存在车次
    TrainNumber isTrainNumber(@Param("trainid") int trainid, @Param("date") String date, @Param("time") String time);

    /**
     * 分页模糊查询查询所有
     *
     * @param page
     * @param name
     * @return
     */
    List<TrainNumber> queryPage(int page, String name);

    /**
     * 查询总条数
     *
     * @param name
     * @return
     */
    int queryAllCount(String name);


}
